.class public Lcom/xingbook/ui/overclass/PinGallery;
.super Landroid/widget/Gallery;

# interfaces
.implements Lcom/xingbook/ui/overclass/e;


# instance fields
.field private a:Z

.field private b:I

.field private c:I

.field private d:Lcom/xingbook/ui/overclass/b;

.field private e:Ljava/lang/Object;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    invoke-direct {p0, p1}, Landroid/widget/Gallery;-><init>(Landroid/content/Context;)V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xingbook/ui/overclass/PinGallery;->a:Z

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/ui/overclass/PinGallery;->e:Ljava/lang/Object;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    invoke-direct {p0, p1, p2}, Landroid/widget/Gallery;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xingbook/ui/overclass/PinGallery;->a:Z

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/ui/overclass/PinGallery;->e:Ljava/lang/Object;

    return-void
.end method


# virtual methods
.method public a(Ljava/lang/Object;II)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/ui/overclass/PinGallery;->e:Ljava/lang/Object;

    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 8

    const/4 v6, 0x1

    const/4 v7, 0x0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :cond_0
    :goto_0
    iget-boolean v0, p0, Lcom/xingbook/ui/overclass/PinGallery;->a:Z

    if-nez v0, :cond_2

    invoke-super {p0, p1}, Landroid/widget/Gallery;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    if-eqz v0, :cond_2

    move v0, v6

    :goto_1
    return v0

    :pswitch_0
    iput-boolean v7, p0, Lcom/xingbook/ui/overclass/PinGallery;->a:Z

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/xingbook/ui/overclass/PinGallery;->b:I

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/xingbook/ui/overclass/PinGallery;->c:I

    goto :goto_0

    :pswitch_1
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/ui/overclass/PinGallery;->e:Ljava/lang/Object;

    goto :goto_0

    :pswitch_2
    iget-boolean v0, p0, Lcom/xingbook/ui/overclass/PinGallery;->a:Z

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/PinGallery;->e:Ljava/lang/Object;

    if-eqz v0, :cond_0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result v0

    invoke-virtual {p0}, Lcom/xingbook/ui/overclass/PinGallery;->getTop()I

    move-result v1

    int-to-float v1, v1

    cmpg-float v0, v0, v1

    if-ltz v0, :cond_1

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result v0

    invoke-virtual {p0}, Lcom/xingbook/ui/overclass/PinGallery;->getBottom()I

    move-result v1

    int-to-float v1, v1

    cmpl-float v0, v0, v1

    if-lez v0, :cond_0

    :cond_1
    iput-boolean v6, p0, Lcom/xingbook/ui/overclass/PinGallery;->a:Z

    iget-object v0, p0, Lcom/xingbook/ui/overclass/PinGallery;->d:Lcom/xingbook/ui/overclass/b;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/PinGallery;->d:Lcom/xingbook/ui/overclass/b;

    iget-object v1, p0, Lcom/xingbook/ui/overclass/PinGallery;->e:Ljava/lang/Object;

    iget v2, p0, Lcom/xingbook/ui/overclass/PinGallery;->b:I

    iget v3, p0, Lcom/xingbook/ui/overclass/PinGallery;->c:I

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F

    move-result v4

    float-to-int v4, v4

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result v5

    float-to-int v5, v5

    invoke-interface/range {v0 .. v5}, Lcom/xingbook/ui/overclass/b;->a(Ljava/lang/Object;IIII)V

    goto :goto_0

    :cond_2
    move v0, v7

    goto :goto_1

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public setDragOutListener(Lcom/xingbook/ui/overclass/b;)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/ui/overclass/PinGallery;->d:Lcom/xingbook/ui/overclass/b;

    return-void
.end method
